home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / VC32.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  127 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Microsoft Visual C++ 1.0 32 bit version.
  12. #
  13. # $Id: vc32.mk 1.1 1995/02/06 12:49:39 kjb release $
  14. #
  15. #############################################################################
  16.  
  17. # Disable warnings for macros redefined here that were given
  18. # on the command line.
  19. __.SILENT       := $(.SILENT)
  20. .SILENT         := yes
  21.  
  22. # File suffix definitions
  23.    L            := .lib   # Libraries
  24.    E            := .exe   # Executables
  25.    O            := .obj   # Objects
  26.    A            := .asm   # Assembler sources
  27.    P            := .cpp   # C++ sources
  28.  
  29. # Import enivornment variables that we use
  30. TMPDIR := $(ROOTDIR)/tmp
  31. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA
  32. .IMPORT .IGNORE : TNT_PATH FPU
  33.  
  34. # We use the MSDOS shell at all times
  35.    SHELL        := $(COMSPEC)
  36.    GROUPSHELL   := $(SHELL)
  37.    SHELLFLAGS   := $(SWITCHAR)c
  38.    GROUPFLAGS   := $(SHELLFLAGS)
  39.    SHELLMETAS   := *"?<>
  40.    GROUPSUFFIX  := .bat
  41.    DIRSEPSTR    := \\
  42.    DIVFILE       = $(TMPFILE:s,/,\)
  43.  
  44. # Default commands for compiling, assembling linking and archiving
  45.    CC           := cl       # C-compiler and flags
  46.    CFLAGS       := /YX /w
  47.    AS           := tasm     # Assembler and flags
  48.    ASFLAGS      := /mx /m /D__FLAT__ /D__COMM__ /i$(SCITECH)\INCLUDE
  49.    LD           := 386link  # Loader and flags
  50.    LDFLAGS       = $(CFLAGS)
  51.    LIB          := lib      # Librarian
  52.    LIBFLAGS     :=
  53.  
  54. # Optionally turn on debugging information
  55. .IF $(DBG)
  56.    CFLAGS       += /Yd /Zi  # Turn on debugging for C compiler
  57.    ASFLAGS      += /zi      # Turn on debugging for assembler
  58. .END
  59.  
  60. # Optionally turn on optimisations
  61. .IF $(OPT)
  62.    CFLAGS       += /G5 /Ox
  63. .END
  64.  
  65. # Optionally turn on direct i387 FPU instructions
  66.  
  67. .IF $(FPU)
  68.    CFLAGS       += /DFPU387
  69.    ASFLAGS      += /DFPU387
  70. .END
  71.  
  72. # Optionally compile a shareware version of a product
  73. .IF $(SHW)
  74.    LIB_DIR      := LIBSW
  75.    CFLAGS       += /DSHAREWARE
  76. .ELSE
  77.    LIB_DIR      := LIB
  78. .END
  79.  
  80. # Optionally compile a beta release version of a product
  81. .IF $(BETA)
  82.    CFLAGS       += /DBETA
  83.    ASFLAGS      += /DBETA
  84. .END
  85.  
  86. # DOS extender dependant flags
  87.    USE_TNT      := 1
  88.    DX_CFLAGS    += /DTNT
  89.    DX_ASFLAGS   += -DTNT
  90.  
  91. # Place to look for PMODE library files
  92.  
  93. .IF NOT $(MK_PMODE)
  94. PMLIB           := tnt\pmode.lib
  95. .END
  96.  
  97. # Define where to install library files
  98.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\VC32
  99.    LIB_DEST     := $(LIB_BASE)
  100.  
  101. # Definition of $(MAKE) macro for recursive makes.
  102.    MAKE = $(MAKECMD) $(MFLAGS)
  103.  
  104. # Macro to install a library file
  105.    INSTALL      := cp
  106.  
  107. # Implicit generation rules for making object files
  108.    %$O: %.c ; +$(CC) /nologo $(CFLAGS) /c $<
  109.    %$O: %$P ; +$(CC) /nologo $(CFLAGS) /c $<
  110.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  111.  
  112. # Implicit rule for building a library file using response file
  113.    %$L:      ; $(LIB) $(LIBFLAGS) /out:$@ @$(mktmp $(?:t"\n")\n)
  114.  
  115. # Implicit rule for building an executable file using response file
  116.    %$E:      ; +$(LD) @msvc32.dos -exe $@ @$(mktmp,$*.lnk $(&:s/\/\\) $(PMLIB) $(EXELIBS))
  117.  
  118. # DMAKE uses this recipe to remove intermediate targets
  119. .REMOVE :; $(RM) -f $<
  120.  
  121. # Turn warnings back to previous setting.
  122. .SILENT := $(__.SILENT)
  123.  
  124. # We dont use TABS in our makefiles
  125. .NOTABS         := yes
  126.  
  127.